@import './../fd.scss';

$activeColor: rgba(
  $color: $primary-color,
  $alpha: 0.09,
);

.wrap {
  display: flex;
  flex: 1 1;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
  background: #f0f2f5;
  color: $black;
  * {
    box-sizing: border-box;
  }
}

.menus {
  position: relative;
  transition: all .3s;
  width: 270px;
  min-width: 270px;
  height: 100%;
  overflow-y: auto;
  background: #fff;
  .shrink{
    position: absolute;
    right: 10px;
    top: 24px;
    font-size: 20px;
  }
  dl {
    width: 238px;
    margin-top: 20px;

    &:first-child {
      margin-top: 0;
    }
  }

  dt {
    margin-bottom: 12px;
    font-size: 16px;
  }

  dd {
    overflow: hidden;
    font-size: 14px;

    div {
      float: left;
      display: flex;
      align-items: center;
      width: 119px;
      height: 36px;
      line-height: 34px;
      padding: 0 10px;

      margin-top: 8px;
      border: dashed 2px rgba($color: $black, $alpha: 0);
      color: rgba($color: $black, $alpha: 0.65);

      span:first-child {
        width: 20px;
        text-align: center;
      }

      span:last-child {
        margin-left: 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      &:nth-child(odd) {
        margin-left: 0;
      }

      &:hover {
        cursor: move;
        color: $primary-color;
        border: dashed 2px $primary-color;
        background: rgba(0, 121, 255, 0.1);
      }
    }
  }
}


.hidemenus{
  width: 30px;
  min-width: 30px;
  overflow: hidden;
  transition: width .3s;
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  padding: 0 8px;
  padding-right: 0;
  margin-left: 8px;
  background: #fff;
  overflow-y: hidden;
}

.ghostForm {
  flex: 1 1;
  height: 0;
}

.canvas {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  align-content: flex-start;
  padding: 16px;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  padding-bottom: 150px;
  &.active {
    background: $activeColor;
  }
}

[data-controlid] {
  position: relative;
  border-collapse: collapse;
  margin-bottom: 0;
  border: transparent solid 1px;
  cursor: move;

  &:not([data-active='true']):hover {
    // background: rgba($color: $black, $alpha: 0.04);
  }

  &::after {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background: transparent;
    content: '';
  }

  &[data-controltype='row'] {
    border: dashed 1px rgba($color: $black, $alpha: 0.2);

    &::after {
      display: none;
    }
  }

  &[data-controltype='col'] {
    border: dashed 1px rgba($color: $black, $alpha: 0.2);

    &::after {
      display: none;
    }
  }

  &[data-controltype='collapse'] {
    border: dashed 1px rgba($color: $black, $alpha: 0.2);

    &::after {
      display: none;
    }
  }
}

[data-active='true'] {
  border-radius: 2px;
  border: $primary-color solid 1px !important;
  background: $activeColor;
}

[data-candrop='true'] {
  background: $activeColor;
}

[data-hover='true'][data-direction='down'] {
  border-bottom: solid 3px #f00 !important;
}

[data-hover='true'][data-direction='up'] {
  border-top: solid 3px #f00 !important;
}

[data-hover='true'][data-direction='right'] {
  border-right: solid 3px #f00 !important;
}

[data-hover='true'][data-direction='left'] {
  border-left: solid 3px #f00 !important;
}

.removeItemIcon {
  display: block;
  margin-left: 10px;
  min-width: 20px;
  height: 20px;
  line-height: 18px;
  border-radius: 50%;
  color: #f56c6c;
  background: #fef0f0;
  border-color: #fbc4c4;
  font-size: 18px;
  text-align: center;

  &:hover {
    background: #f56c6c;
    color: #fff;
    cursor: pointer;
  }
}

.canvasItemActions {
  position: absolute;
  margin-bottom: 0;
  padding: 2px 1px;
  border-bottom-left-radius: 5px;
  color: #fff;
  z-index: 2;
  border-radius: 0px 2px 0px 0px;
  &.bg {
    background: $primary-color;
    z-index: 99;
  }
  div {
    position: absolute;
    width: 1px;
    height: 12px;
    top: 50%;
    left: 50%;
    margin-left: -0.5px;
    margin-top: -6px;
    background: rgba(255, 255, 255, 0.36);
  }
  span {
    display: inline-block;
    margin-left: 5px;
    font-size: 14px;
    margin: 0 4px;
  }

  .removeIcon {
    display: inline-block;
    width: 14px;
    height: 14px;
    cursor: pointer;
  }

  .dragIcon {
    @extend .removeIcon;
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: move;
  }
}

.controlId {
  position: absolute;
  top: 2px;
  right: 5px;
  color: #67c23a;
  font-size: 12px;
}

.setting {
  transition: all .3s;
  display: flex;
  flex-direction: column;
  width: 270px;
  min-width: 270px;
  height: 100%;
  padding-left: 16px;
  margin-left: 8px;
  overflow: hidden;
  background: #fff;

  :global {
    .ant-radio-button-wrapper {
      padding: 0 13px;
      flex: 1 1;
      text-align: center;
    }

    .ant-radio-group {
      display: flex;
    }
    .ant-tabs-top > .ant-tabs-nav {
      margin: 0;
    }

    .ant-form-item {
      margin-bottom: 21px;
    }
    .ant-form-item-label {
      padding-bottom: 0;
      color: rgba(35, 37, 40, 0.65);
    }
  }
}

.addWidth{
  transition: all .3s;
  width: 510px;
  min-width: 510px;
}

.settingMain {
  flex: 1;
  height: 0;
  overflow-y: auto;
  position: relative;
  padding-bottom: 150px;
  :global(.ant-form-item) {
    margin-bottom: 0 !important;
  }

  :global(.ant-form-item-label label) {
    padding: 0;
    margin-bottom: 4px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(35, 37, 40, 0.65);
    line-height: 22px;
  }
}

.settingMain::-webkit-scrollbar {
  width: 0px;
}

.settingName {
  margin-bottom: 4px;

  span:first-child {
    margin-right: 5px;
    font-size: 16px;

    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #232528;
    line-height: 24px;
    display: inline-block;
  }

  :global(.anticon) {
    color: rgba($color: $black, $alpha: 0.45);
  }
}

.noListTip {
  margin: 0;
  height: 100%;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  color: #ddd;
  font-size: 20px;
}

// 样式设置
.styleSetList {
  margin: 0;
  padding: 0;
  li {
    display: flex;
  }
}

.stylesEdit {
  padding: 0;
  margin: 0;
  list-style: none;
  color: #999;

  li {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
  }

  .styleName {
    display: block;
    width: 150px;
  }
}

.formNameDesc {
  padding: 21px;

  background: #fff;

  input {
    cursor: pointer;
    display: block;
    width: 100%;
    height: 38px;
    line-height: 38px;
    border: none;
    margin-top: 4px;
    border: solid 1px transparent;
    // background: rgba($color: #232528, $alpha: .04);
    font-family: PingFangSC-Medium, PingFang SC;
    outline: none;
    text-indent: 4px;
    color: rgba($color: #232528, $alpha: 0.25);
    &:focus {
      border: solid 1px $primary-color;
      background: rgba($color: $primary-color, $alpha: 0.09);
      color: #232528;
    }

    &:first-child {
      margin-top: 0;
      font-size: 20px;
    }
  }
  input:hover {
    background: rgba(35, 37, 40, 0.04);
  }
}

.line {
  height: 8px;
  background: #f0f2f5;
  margin-left: -8px;
}
